<div class="farris-form-controls-inline p-2 f-form-layout farris-form f-form-lable-auto"
  *ngIf="editorParams.dynamicMappingKeys">

  <div class="farris-group-wrap mr-3">
    <div class="form-group farris-form-group">
      <label class="col-form-label">
        <span class="farris-label-info text-danger">*</span>
        <span class="farris-label-text">枚举值字段</span>
      </label>
      <div class="farris-input-wrap">
        <input type="input" class="form-control" [(ngModel)]="editorParams.valueField"
          [readonly]="editorParams && editorParams.readonly">
      </div>
    </div>
  </div>
  <div class="farris-group-wrap">
    <div class="form-group farris-form-group">
      <label class="col-form-label">
        <span class="farris-label-info text-danger">*</span>
        <span class="farris-label-text">枚举名称字段</span>
      </label>
      <div class="farris-input-wrap">
        <input type="input" class="form-control" [(ngModel)]="editorParams.nameField"
          [readonly]="editorParams && editorParams.readonly">
      </div>
    </div>
  </div>
</div>

<div class="mb-1 py-1 ml-1">
  <button class="btn f-rt-btn f-btn-ml btn-primary" (click)="addItem()"
    [disabled]="editorParams && editorParams.readonly">新增</button>
  <button class="btn f-rt-btn f-btn-ml btn-secondary" (click)="removeItem()"
    [disabled]="editorParams && editorParams.readonly">删除</button>
</div>

<div class="f-utils-fill border" style="border-radius: 8px;margin: 0 10px;">
  <farris-datagrid [data]="data" [columns]="editorParams.columns" #dg="datagrid" [idField]="'hId'" [fit]="true"
    [editable]="editorParams && !editorParams.readonly" [editMode]="'cell'" [showCheckbox]="false" [fitColumns]="true"
    [showLineNumber]="false" [striped]="true" [virtualized]="false" [pagination]="false" [clickToEdit]="true">
  </farris-datagrid>
</div>


<ng-template #itemsFooter>
  <button type="button" class="btn btn-secondary" (click)="clickCancel()">取消</button>
  <button type="button" class="btn btn-primary" (click)="clickConfirm()">确定</button>
</ng-template>